home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Precision Software Appli…tions Silver Collection 3
/
Precision Software Applications Silver Collection Volume Three (PSM) (1993).iso
/
music2
/
mepody.exe
/
DELAY.C
< prev
next >
Wrap
Text File
|
1991-04-13
|
681b
|
29 lines
/* This is am example of function own_delay(). You can try to use
this function with MELODY MASTER's "Turbo C" output file to make
background music. First, insert your foreground operations into
this function. Second, change all "delay(" in the output file
into "own_delay(" by using Find/Replace commands. */
#include <dos.h>
own_delay(num)
int num;
{
struct time t,ot;
int dif;
/* static YOUR_VARS; */
gettime(&ot);
do
{
/*
YOUR FUNCTION
*/
gettime(&t);
dif = (t.ti_min * 60000 + t.ti_sec*1000 + t.ti_hund*10)
- (ot.ti_min * 60000 + ot.ti_sec*1000 + ot.ti_hund*10);
}
while (dif < num);
}